﻿using System;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Abp.Application.Services.Dto;
using Abp.Extensions;
using LeadThing.AbpZeroTemplate.GridPersons;
using LeadThing.AbpZeroTemplate.EntityFramework;

namespace LeadThing.AbpZeroTemplate.GridPersons.EntityMapper.GridPersons
{

    /// <summary>
    /// 网格基本信息的数据配置文件
    /// </summary>
    public class GridPersonCfg : EntityTypeConfiguration<GridPerson>
    {
        /// <summary>
        ///  构造方法[默认链接字符串< see cref = "AbpZeroTemplateDbContext" /> ]
        /// </summary>
        public GridPersonCfg()
        {
            ToTable("GridPerson", AbpZeroTemplateConsts.SchemaName.Basic);


            // 人员姓名
            Property(a => a.PersonName).HasMaxLength(50);
            // 人员手机号
            Property(a => a.PersonPhone).HasMaxLength(11);
            // 身份证号
            Property(a => a.IDCard).HasMaxLength(18);
            // 人员户籍地
            Property(a => a.CensusRegister).HasMaxLength(500);
            // 备注
            Property(a => a.Remarks).HasMaxLength(4000);
            // 网格员姓名
            Property(a => a.GridName).HasMaxLength(50);
            // 网格员手机号
            Property(a => a.GridPhone).HasMaxLength(11);
            // 协管员姓名
            Property(a => a.AssistName).HasMaxLength(50);
            // 协管员手机号
            Property(a => a.AssistPhone).HasMaxLength(11);
            // 地址
            Property(a => a.Address).HasMaxLength(500);
            // 工作情况
            Property(a => a.WordSituation).HasMaxLength(500);
        }
    }
}